
import domain.Customer;

/**
 * Dummy aspect that prints execution time to stdout
 * 
 */
aspect DummyPerfAspect {

    /** service..* pointcut */
    private pointcut businessMethods(Customer customer):
        call(public * service..*(..)) && args(customer);

    /** aspect logger to stdout   */
    
    Object around(Customer customer): businessMethods(customer) {
       long starttime = System.currentTimeMillis();
       Object o=proceed(customer);
       System.out.println("Service exection time="+String.valueOf(System.currentTimeMillis()-starttime)+" ms");
       return o;
    }
    
    

}
